#import "Box.h"

@interface Box ()

@property(readwrite) boxValue value;
@property(readwrite) NSString* picture;

@end

@implementation Box

    //Designated initialiser
- (instancetype)initWithValue:(boxValue) value andPicture:(NSString*)picture
{
    self = [super init];
    if (self) {
        self.value = value;
        self.picture = picture;
    }
    return self;
}

    //Test initialiser
- (instancetype)initWithValue:(boxValue) value
{
    self = [super init];
    if (self) {
        self.value = value;
        switch (self.value) {
            case two:
                self.picture = @"two.png";
                break;
            case four:
                self.picture = @"four.png";
                break;
            case eight:
                self.picture = @"eight.png";
                break;
            case sixteen:
                self.picture = @"sixteen.png";
                break;
            case thirtytwo:
                self.picture = @"thirty.png";
                break;
            case sixtyfour:
                self.picture = @"sixty.png";
                break;
            case onehundred:
                self.picture = @"onehundred.png";
                break;
            case twohundred:
                self.picture = @"twohundred.png";
                break;
            case fivehundred:
                self.picture = @"fivehundred.png";
                break;
            case onethousand:
                self.picture = @"onethousand.png";
                break;
            case twothousand:
                self.picture = @"twothousand.png";
                break;
                
            default:
                break;
        }
    }
    return self;
}




@end
